﻿using System;
using System.Collections.Generic;

namespace Infrastructure.NetExtensions
{
    public static class DictionaryExtensions
    {
        public static void AddKeys<T>(this IDictionary<string, T> dictionary, string keys, T value)
        {
            dictionary.AddKeys(keys.Split(','), value);
        }

        public static void AddKeys<T>(this IDictionary<string, T> dictionary, string[] keys, T value)
        {
            foreach (string key in keys)
            {
                dictionary.Add(key, value);
            }
        }
    }
}
